package com.shortlink.common.constants;


public enum AppHttpCodeEnum implements IErrorCode{
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    CLIENT_ERROR(600, "用户端错误"),
    USER_NOT_EXIST(602, "用户不存在"),

    USER_NAME_EXIST(603, "用户名已存在"),

    USER_EXIST(605, "用户记录已存在"),

    USER_SAVE_ERROR(606, "用户记录新增失败"),
    USER_PASSWORD_ERROR(607,"用户密码错误"),
    USER_PHONE_INVALID(608,"用户手机号不合法"),
    USER_MAIL_INVALID(609,"用户邮箱不合法"),
    USER_USERNAME_INVALID(610,"用户名不合法"),
    USER_NAME_NOTNULL(611,"用户名不能为空"),
    PASSWORD_NOTNULL(612,"用户密码不能为空"),
    GROUP_NAME_EMPTY(621,"分组名称不能为空"),
    USER_LOGIN_ERROR(630,"用户已登录"),

    SERVICE_ERROR(700, "系统执行出错"),
    FLOW_LIMIT_ERROR(701,"当前系统繁忙，请稍后再试"),
    PASSWORD_FORMAT_ERROR(709,"密码格式错误"),
    LINK_GENERATE_FREQUENTLY(711,"短链接生成频繁"),
    GROUP_GID_GENERATE_FREQUENTLY(721,"分组id生成频繁");

    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
